package com.sali.design_pattern.b_abstract_factory_pattern.lesson_01;

import com.sali.design_pattern.b_abstract_factory_pattern.lesson_01.factory.IFamilyFactory;
import com.sali.design_pattern.b_abstract_factory_pattern.lesson_01.factory.impl.PlasticFamilyFactory;
import com.sali.design_pattern.b_abstract_factory_pattern.lesson_01.product.IChair;
import com.sali.design_pattern.b_abstract_factory_pattern.lesson_01.product.IDesk;

/**
 * @description:
 * @author: zhang hang
 * @date: 2023/3/18 19:49.
 * @version: 1.0
 */
public class Lesson01Starter {

    public static void main(String[] args) {
        // 先找到工厂，然后找到塑料部门，然后找产品
        IFamilyFactory familyFactory = new PlasticFamilyFactory();
        IChair chair = familyFactory.createChair();
        IDesk desk = familyFactory.createDesk();

        System.out.println(chair.getType());
        System.out.println(desk.getType());
    }

}
